package com.atguigu.lease.web.admin.service;

import com.atguigu.lease.model.entity.RoomInfo;
import com.atguigu.lease.model.enums.ReleaseStatus;
import com.atguigu.lease.web.admin.vo.room.RoomDetailVo;
import com.atguigu.lease.web.admin.vo.room.RoomItemVo;
import com.atguigu.lease.web.admin.vo.room.RoomQueryVo;
import com.atguigu.lease.web.admin.vo.room.RoomSubmitVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author liubo
* @description 针对表【room_info(房间信息表)】的数据库操作Service
* @createDate 2023-07-24 15:48:00
*/
public interface RoomInfoService extends IService<RoomInfo> {

    /**
     * 保存或更新房间信息
     * @param roomSubmitVo
     */
    void saveOrUpdateRoomInfo(RoomSubmitVo roomSubmitVo);

    /**
     * 分页查询房间信息
     * @param page
     * @param queryVo
     * @return
     */
    IPage<RoomItemVo> findRoomItemVoPage(IPage<RoomItemVo> page, RoomQueryVo queryVo);


    /**
     * 根据id查询房间详情
     * @param id
     * @return
     */
    RoomDetailVo findRoomDetailVoById(Long id);

    /**
     * 根据id删除房间信息
     * @param id
     */
    void removeRoomById(Long id);

    /**
     * 根据id修改房间发布状态
     * @param id
     * @param status
     */
    void updateReleaseStatusById(Long id, ReleaseStatus status);

    /**
     * 根据公寓ID查询房间列表
     * @param id
     * @return
     */
    List<RoomInfo> listBasicByApartmentId(Long id);
}
